﻿using System;
using static CyberU;
using static CyberU.UI;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
using UnityEngine.Serialization;

public class NodeOperation : MonoBehaviour
{
    public Image image;
    public GraphNode node;
    public Clicker clicker;

    public void Awake()
    {
        image=GetOrAddComponent<Image>(gameObject);
        // image.color = node.color;
        clicker=GetOrAddComponent<Clicker>(gameObject);
        node=FindComponentInParent<GraphNode>(gameObject);
        clicker.Add(()=>
        {
            if (node == null)
            {
                Delog("node is null");
            }
        });
    }
}